package com.sykj.pojo;


import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;


@Setter
@Getter
@ToString
public class User {
  private long id;
  @NotBlank(message="用户名不能为空")

  private String name;
  @NotBlank(message="密码不能为空")
  private String password;
  private String salt;
  private Integer status;
  @NotBlank(message="地址不能为空")
  private String address;
  @NotBlank(message="手机号不能为空")
  @Pattern(regexp = "^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|"
          + "(166)|(17[0,1,3,5,6,7,8])|(18[0-9])|(19[8|9]))\\d{8}$"
          , message = "手机号格式错误")
  private String phone;
  private Date lasttime;

}
